Repository navigation
fix(@angular/cli): accept multi-digit array indices in ng config - #34305
Merged
alan-agius4 merged 1 commit intoOct 12, 2026
Merged
Conversation
multi-digit index like `styles[10]` stayed string, so get failed and set threw now any run of digits is parsed as array idnex
There was a problem hiding this comment.
Code Review
This pull request exports the parseJsonPath function and updates its regular expression to support multi-digit array indices, accompanied by new unit tests. The review feedback suggests a robust improvement to the quote-stripping logic to target only leading and trailing quotes, preventing unintended removal of internal quotes within keys.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
PR Type
What is the current behavior?
Issue Number: N/A
parseJsonPathmakes bracket segment number only when it is single digit (/^\d$/), so[10]stays string'10'and jsonc-parser cant find it in arrayOption help shows
a[3].foo.bar[2]as exmaple, nothing says indices stop at 9Workspace with 12 styles:
What is the new behavior?
Any run of digits is parsed as index, so
styles[10]anda[2][13]work for get and setQuoted segments like
a['10']stay string keysparseJsonPathis exported now and newcli_spec.tscovers it, multi-digit case fails on mainDoes this PR introduce a breaking change?
Other information
Unquoted
[10]on object now acts like[3]always did,["10"]still reaches such key